import sqlite3

conn = sqlite3.connect('niit.sqlite')
cur = conn.cursor()
# 使用占位符？设置参数
sql_update = """
    update student set stu_age = ? where stu_id = ?
"""
cur.execute(sql_update, (99, 1002))
conn.commit()
conn.close()
print('更新成功。。。')
